﻿//------------------------------------------------------------
// AureFramework
// Developed By Drunk Fish
// GitHub: https://github.com/YYYurz
// Gitee: https://gitee.com/yyyurz
//------------------------------------------------------------

using AureFramework.Entity;
using UnityEditor;

namespace AureFramework.Editor
{
	[CustomEditor(typeof(EntityModule))]
	public class EntityModuleInspector : AureFrameworkInspector
	{
		private SerializedProperty entityGroupArray = null;

		public override void OnInspectorGUI()
		{
			base.OnInspectorGUI();

			serializedObject.Update();

			EditorGUI.BeginDisabledGroup(EditorApplication.isPlayingOrWillChangePlaymode);
			{
				EditorGUILayout.PropertyField(entityGroupArray, true);
			}
			EditorGUI.EndDisabledGroup();

			serializedObject.ApplyModifiedProperties();
			Repaint();
		}
		
		private void OnEnable()
		{
			entityGroupArray = serializedObject.FindProperty("entityGroupArray");
		}
	}
}